#ifndef ELEMENTS_ITEM_TYPE_H
#define ELEMENTS_ITEM_TYPE_H

#include "element.h"

namespace Elements
{

struct ItemType : public Element
{
    enum class Kind : unsigned
    {
        Requirement = 1,
        Issue = 2,
        Test = 3,
        Wish = 4, // ?
    };

    ItemType() = default;
    ItemType(const ItemType& other);

    // -- Интерфейс элемента -- //

    virtual bool isSame(Element* const other) const override;

    virtual Common::Json toJson() const override;
    virtual void fromJson(const Common::Json& json) override;

    virtual Element* clone() const override;
    virtual ElementType elementType() const override;

    // -- Интерфейс данных -- //

    unsigned workflowId() const;
    void setWorkflowId(unsigned value);

    unsigned defaultStateId() const;
    void setDefaultStateId(unsigned value);

    std::string caption() const;
    void setCaption(const std::string& value);

    Kind kind() const;
    void setKind(Kind value);

private:
    unsigned m_workflowId = 0;
    unsigned m_defaultStateId = 0;
    std::string m_caption;
    Kind m_kind;

};

typedef std::shared_ptr<ItemType> ItemTypePtr;
typedef std::vector<ItemTypePtr> ItemTypes;

} // namespace Elements

#endif // ELEMENTS_ITEM_TYPE_H
